<?php

/**
 * Created by EPP.
 * User: yuxun
 * Date: 18/6/26
 * Time: 21:21
 */
class ResourceApplyService extends Service{

    public static function indexHeader(){
        $header = array(
        		'id'=>array('text' => 'ID', 'width' => '50px'),
        		'apply_user'            => array('text' => '申请人', 'width' => '150px'),
                'apply_time'   => array('text' => '申请时间', 'width' => '150px'),
                'rolename'       => array('text' => '角色', 'width' => '100px'),
        	    'server' => array('text' => '服务器', 'width' => '150px'),
        		'resource' => array('text' => '资源清单', 'width' => '200px'),
        		'content' => array('text' => '邮件内容', 'width' => '200px'),
                'action'        => array('text' => '操作', 'width' => '150px'),
        );

        return $header;
    }

    public static function indexData($params){
        $result = array(
        		array('id'=>1,'apply_user'=>'admin','apply_time'=>'2018-06-28 19:35','rolename'=>'濮阳剑极','server'=>'S1','resource'=>'10000元宝充值卡(213190004)x99(使用后绑定)','content'=>'内容'),
        		array('id'=>1,'apply_user'=>'admin','apply_time'=>'2018-06-28 19:35','rolename'=>'韩杰','server'=>'S1','resource'=>'经验升级丹(213200001)x100(使用后绑定)','content'=>'内容'),
        		array('id'=>1,'apply_user'=>'admin','apply_time'=>'2018-06-28 19:35','rolename'=>'周桦','server'=>'S1','resource'=>'仙童进阶丹(216110401)x20(使用后绑定)','content'=>'内容'),
        );
        
        foreach($result as &$v){
        	$v['action'] = '';
        	$v['action']        .= '&nbsp;&nbsp;<a href="#" name="" data-id="'.$v['id'].'">批准</a>';
            $v['action']        .= '&nbsp;&nbsp;<a href="#" name="" data-id="'.$v['id'].'">驳回</a>';    	        	
        }
        unset($v);

        return $result;
    }

    


}